#!/usr/bin/env python
# encoding: utf-8
"""
@author: youfeng
@email: youfeng243@163.com
@license: Apache Licence
@file: cookie_demo.py
@time: 2018/1/4 21:52
"""
import requests


def main():
    session = requests.Session()

    r = session.get(
        'http://xj.gsxt.gov.cn/%7BTixlo8Fys5MC-VwcLqBajhWiMuy0dK6CbNhhQWGCArqKK7AIqBxtiEV0jVJnyrYqBpPKNz_-uwSpBOnzh3FXPETopRuDf0WbN4vQbxZ3K-8-1515072361083%7D')
    print r.status_code
    print r.cookies

    for key, value in r.cookies.iteritems():
        print "{}={}".format(key, value)

    for key, value in session.cookies.iteritems():
        print "{}={}".format(key, value)
    print r.text


if __name__ == '__main__':
    main()
